package com.triz.business.service.impl;

import java.util.List;
import com.triz.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.triz.business.mapper.FunctionalAnalysisMapper;
import com.triz.business.domain.FunctionalAnalysis;
import com.triz.business.service.IFunctionalAnalysisService;

/**
 * 功能分析Service业务层处理
 * 
 * @author hlk
 * @date 2025-11-15
 */
@Service
public class FunctionalAnalysisServiceImpl implements IFunctionalAnalysisService 
{
    @Autowired
    private FunctionalAnalysisMapper functionalAnalysisMapper;

    /**
     * 查询功能分析
     * 
     * @param id 功能分析主键
     * @return 功能分析
     */
    @Override
    public FunctionalAnalysis selectFunctionalAnalysisById(Long id)
    {
        return functionalAnalysisMapper.selectFunctionalAnalysisById(id);
    }

    /**
     * 查询功能分析列表
     * 
     * @param functionalAnalysis 功能分析
     * @return 功能分析
     */
    @Override
    public List<FunctionalAnalysis> selectFunctionalAnalysisList(FunctionalAnalysis functionalAnalysis)
    {
        return functionalAnalysisMapper.selectFunctionalAnalysisList(functionalAnalysis);
    }

    /**
     * 新增功能分析
     * 
     * @param functionalAnalysis 功能分析
     * @return 结果
     */
    @Override
    public int insertFunctionalAnalysis(FunctionalAnalysis functionalAnalysis)
    {
        functionalAnalysis.setCreateTime(DateUtils.getNowDate());
        return functionalAnalysisMapper.insertFunctionalAnalysis(functionalAnalysis);
    }

    /**
     * 修改功能分析
     * 
     * @param functionalAnalysis 功能分析
     * @return 结果
     */
    @Override
    public int updateFunctionalAnalysis(FunctionalAnalysis functionalAnalysis)
    {
        functionalAnalysis.setUpdateTime(DateUtils.getNowDate());
        return functionalAnalysisMapper.updateFunctionalAnalysis(functionalAnalysis);
    }

    /**
     * 批量删除功能分析
     * 
     * @param ids 需要删除的功能分析主键
     * @return 结果
     */
    @Override
    public int deleteFunctionalAnalysisByIds(Long[] ids)
    {
        return functionalAnalysisMapper.deleteFunctionalAnalysisByIds(ids);
    }

    /**
     * 删除功能分析信息
     * 
     * @param id 功能分析主键
     * @return 结果
     */
    @Override
    public int deleteFunctionalAnalysisById(Long id)
    {
        return functionalAnalysisMapper.deleteFunctionalAnalysisById(id);
    }
}
